package cn.xiaolang.function.design_pattern.object_adapter;

public class GetStarted {

    public static void main(String[] args) {
        //携带圆形接口
        CircularPort circularSocket = new CircularSocket();
        //带着圆形适配器
        SocketAdapter socketAdapter = new SocketAdapter(circularSocket);
        //进入有usb插座的房间
        Home home = new Home(socketAdapter);
        //圆形接口，用适配器连接usb接口进行充电
        home.charge();

        //携带usb充电线
        USBPort useSocket = new USBSocket();
        //进入有usb插座的房间
        Home home2 = new Home(useSocket);
        home2.charge();
    }
}
